// https://nuxt.com/docs/api/configuration/nuxt-config

import Components from 'unplugin-vue-components/vite'
import {
    AntDesignVueResolver
} from 'unplugin-vue-components/resolvers'

export default defineNuxtConfig({
  devtools: { enabled: true },
  vite: {
    plugins: [
      Components({
        resolvers: [
            AntDesignVueResolver({
                importStyle:'less'
            }),
          ],
      }),
    ],
    css: {
      preprocessorOptions: {
        less: {
          modifyVars: {
            'primary-color': '#f00'
          },
          // javascriptEnabled: true
        }
      }
    },
    ssr: {
      noExternal: ['ant-design-vue'] // 服务端渲染时，将数组中对应组件当作外部资源处理 不打包进最终的输出文件中
    }
  }
})
